package br.com.universidade.servlets.materia;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.com.universidade.dao.MateriaDao;
import br.com.universidade.servlets.GenericServlet;
import br.com.universidade.util.enun.ViewEnun;

@WebServlet(urlPatterns="/PAGES/materia/removerMateria")
public class RemoverMateriaServlet extends GenericServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
	throws ServletException, IOException {
		int codigo = new Integer(req.getParameter(ViewEnun.Materia.ID.getValue()));
		try {
			MateriaDao materiaDao = new MateriaDao();
		//	materiaDao.deletar(codigo);
		} catch (Exception e) {
			saveErrorMessage(req);
		}finally{
			req.getRequestDispatcher("/PAGES/materia/listarMateria").forward(req, resp);
		}
		
	}
}
